package com.ethink.warehouse.api.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 物流调拨单 新增请求对象
 *
 * @author default
 * @date 2022-11-10
 */
@Data
public class LogisticsTransferOrderAddRequest {

    @Schema(description ="枚举 订单类型:1-销售调拨(t1)|2-物流调拨换仓(t2)|3-物流调拨转境内(t3)")
    @NotNull(message = "订单类型不能为空")
    private Integer orderType;

    @Schema(description ="收货分仓编码")
    @NotNull(message = "收货分仓编码不能为空")
    private String inSubWarehouseCode;

    @Schema(description ="收货分仓名称")
    @NotNull(message = "收货分仓名称不能为空")
    private String inSubWarehouseName;

    @Schema(description ="发货分仓编码")
    @NotNull(message = "发货分仓编码不能为空")
    private String outSubWarehouseCode;

    @Schema(description ="发货分仓名称")
    @NotNull(message = "发货分仓名称不能为空")
    private String outSubWarehouseName;

    @Schema(description ="制单人账号")
    private String createUserCode;

    @Schema(description ="制单人名称")
    private String createUserName;

    @Schema(description ="备注信息")
    private String remark;

    @Schema(description ="枚举 新建类型:1-暂存 | 2-提交")
    @NotNull(message = "新建类型不能为空")
    private Integer addType;

    @Schema(description ="商品明细")
    private List<LogisticsTransferOrderAddRequestMateItem> items;

    @Data
    public static class LogisticsTransferOrderAddRequestMateItem {
        @Schema(description = "库存主键")
        private Long mateInventoryId;

        @Schema(description ="调拨数量")
        private Integer qty;
    }

}
